﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:TypeConverters1="clr-namespace:Infrastructure.TypeConverters;assembly=Infrastructure" 
    x:Class="UI.Controls.AddCover"
    mc:Ignorable="d"
	>
    
    <UserControl.Resources>
        <TypeConverters1:LinkVMToStringConverter x:Key="linkConverter" />
    </UserControl.Resources>
	    
	<Grid>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="Auto" />
			<ColumnDefinition Width="*" />
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto" />
		</Grid.RowDefinitions>
		<Label Grid.Column="0" Content="File:"/>
		<Grid Grid.Column="1">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="Auto" />
			</Grid.ColumnDefinitions>
			<TextBox x:Name="File" MinWidth="100" Text="{Binding Path, Converter={StaticResource linkConverter}}" />
			<Button x:Name="FileSelector" Content="..." Grid.Column="1" HorizontalAlignment="Right" Width="20" Click="FileSelector_Click" />
		</Grid>
		<Label Content="Description:" Grid.Row="1"/>
		<TextBox x:Name="Description" TextWrapping="Wrap" Grid.Row="1" Grid.Column="1" Text="{Binding Description}" />
		<Label Margin="0,0,0.028,0" Content="Cover size:" Grid.Row="2"/>
		<Slider x:Name="Size" Grid.Column="1" Grid.Row="2" Maximum="3" Minimum="1" Value="2" TickPlacement="BottomRight" SmallChange="1" IsSnapToTickEnabled="True" MaxWidth="200" MinWidth="100" HorizontalAlignment="Left" ValueChanged="Size_ValueChanged" />
		<CheckBox Margin="0,0,4.433,10" Content="Default" d:LayoutOverrides="Width, Height" Grid.Row="3" Grid.Column="1" IsChecked="{Binding IsDefault}"/>
		<Button x:Name="AddNewCover" Content="Add"  Grid.Row="4" Grid.ColumnSpan="2" HorizontalAlignment="Right" Margin="5,8,5,0" Click="AddCover_Click" />
	   
	</Grid>
	   
</UserControl>
